/*
Copyright 2012 fangqing.fan@hotmail.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 */
package com.fanfq.itrack;

import java.io.Serializable;

public class Gps implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1725552388282878449L;
	private double latitude;//纬度
	private double longitude;//经度
	private double altitude;//海拔
	private double bearing;//方向
	private double speed;//速度
	private long timestamp;//GPS时间
	private double distance;//距离
	private int pos;//索引从0开始
	private long elapsed_time;//运行时间
	private int filtered;//需要过滤的数据默认pos为0的时候该数据为1其他为0
	private long device_time;//设备时间
	private double v_accuracy;//垂直精度
	private double h_accuracy;//水平精度
	private String description;//描述信息
	private String ride_id;
	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public double getAltitude() {
		return altitude;
	}

	public void setAltitude(double altitude) {
		this.altitude = altitude;
	}

	public double getBearing() {
		return bearing;
	}

	public void setBearing(double bearing) {
		this.bearing = bearing;
	}

	public double getSpeed() {
		return speed;
	}

	public void setSpeed(double speed) {
		this.speed = speed;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	public double getDistance() {
		return distance;
	}

	public void setDistance(double distance) {
		this.distance = distance;
	}

	public int getPos() {
		return pos;
	}

	public void setPos(int pos) {
		this.pos = pos;
	}

	public long getElapsed_time() {
		return elapsed_time;
	}

	public void setElapsed_time(long elapsed_time) {
		this.elapsed_time = elapsed_time;
	}

	public int getFiltered() {
		return filtered;
	}

	public void setFiltered(int filtered) {
		this.filtered = filtered;
	}

	public long getDevice_time() {
		return device_time;
	}

	public void setDevice_time(long device_time) {
		this.device_time = device_time;
	}

	public double getV_accuracy() {
		return v_accuracy;
	}

	public void setV_accuracy(double v_accuracy) {
		this.v_accuracy = v_accuracy;
	}

	public double getH_accuracy() {
		return h_accuracy;
	}

	public void setH_accuracy(double h_accuracy) {
		this.h_accuracy = h_accuracy;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getRide_id() {
		return ride_id;
	}

	public void setRide_id(String ride_id) {
		this.ride_id = ride_id;
	}

	@Override
	public String toString() {
		return  "纬度:"+latitude+",经度:"+longitude+",海拔:"+altitude+",方向:"+bearing+",速度:"+speed+",GPS时间:"+timestamp;
	}
	
	public boolean equals(Gps o) {
		boolean result = false;
		if (this.latitude == o.getLatitude()
				&& this.longitude == o.getLongitude()) {
			result = true;
		}
		return result;
	}
	
	
}
